﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using SureKAM.BackUp.Notify.DataAccess.implement;
using SureKAM.BackUp.Notify.Domain;

namespace SureKAM.BackUp.Noitfy.DataAccess.Test
{
    public class DirectoryResTestFixture
    {
        private DirectoryRes _directoryRes;

        [TestFixtureSetUp]
        public  void  TestFixtureSetup()
        {
            this._directoryRes=new DirectoryRes();
        }

        [Test]
        public  void  GetTemplatesTest()
        {
            Notify.Domain.ObjectValue.SendTemplate sendTemplate = this._directoryRes.GetTemplate();
            Assert.IsNotNull(sendTemplate);
        }

        [Test]
        public  void  SaveToFileTest()
        {
            Directory directory=new Directory();
            directory.ID = Guid.NewGuid().ToString();
            directory.Name = "wuhong";
            directory.LastChangeTime = DateTime.Now;
            directory.CreateTime = DateTime.Now;

            this._directoryRes.InsertDirectory(directory);
            this._directoryRes.SaveToFile();
        }

        [Test]
        public void GetDirectoriesTest()
        {
            List<Notify.Domain.Directory> directories = this._directoryRes.GetDirectorys();

        }
    }
}
